function init() {
    //console.log(getmemberInfo());
    var info = getmemberInfo();
    $('#name').text(info.nickName);
    $('#logo').attr("src", info.logo);
    orderCount();
}


function getmemberInfo() {
    var member;
    $.ajax({
        type: "post",
        url: ajaxUrl + "/mobile/member/getMember",
        async: false,
        data: {'memberId': memberId},
        success: function (data) {
            member = data.result;
        }
    });
    return member;
}

function orderCount() {
    $.ajax({
        type: "post",
        url: ajaxUrl + "/mobile/order/orderCount",
        async: false,
        data: {'memberId': memberId},
        success: function (data) {
            console.log(data);
            var result = data.result;

            setOrderCount($('#dfk'), result.waitPayCount);
            setOrderCount($('#dfh'), result.waitSendCount);
            setOrderCount($('#dsh'), result.waitConfirmCount);
            setOrderCount($('#dth'), result.waitSinceCount);
            setOrderCount($('#dpj'), result.waitCommentCount);
            setOrderCount($('#tksh'), result.waitRefundCount);
        }
    });
}

function setOrderCount(d, i) {
    if (i == 0) {
        d.remove();
    } else {
        d.text(i)
        d.css("display","");
    }
    //   d.remove();
}